Add multiple lines to a Cart by Item_ID, Stock Code or Alternative Part Number.Adds one or more items by Item_ID, Stock Code or Alternative Part Number to the shopping cart. Introduced in 2023.1
Method | AddItemsToCart |
The request body is of type AddItemsToCart.
Name | Description | Data Type |
---|---|---|
Items | An object containing an array of Items to add to the cart. | xml:string |
// Example: Add three items to the cart in a single Operations MakeAJAXCall("Cart.AddItemsToCart", { Items: [{ Item_ID: 579, Qty: 1, UOM: 0, Options: { Warehouse: 'N' } }, { StockCode: 'SER200', Qty: 1, UOM: 0 }, { PartNumber: 'A101-1', Qty: 1, UOM: 0 }] }, console.log);
The response body is of type AddItemsToCartResponse.
Name | Description | Data Type |
---|---|---|
AddItemsToCartResult | A string value containing a JSON object. { "Data": { "ItemCount": 3, "SubTotalAmount": 1363.4, "Weight": 20.0, "Volume": 0.6, "LastUpdated": "2022-10-04T20:04:03.74", "SubTotal": "$1,363.40", "Detail": [{ "Row": 1, "ID": 15635, "Item_ID": 580, "Parent_ID": -1, "StockCode": "A101", "Description": "15 Speed Mountain Bike Girls", "Quantity": 1, "UOM": "EA", "UnitType": 1, "DefaultPriceAmount": 672.0, "CustomerPriceAmount": 672.0, "DiscountPriceAmount": 672.0, "WebPriceAmount": 638.4, "TotalPriceAmount": 638.4, "UnitWeight": 10.0, "UnitVolume": 0.3, "IsBackordered": false, "Warehouse": "", "LastUpdated": "2022-10-04T20:04:05.237", "URL": "/ECommerce/product/drs-0204-3/rulon-lr-sleeve-bearing", "Photo": "/Ecommerce/site/images/Photo1/A101.jpg", "DefaultPrice": "$672.00", "CustomerPrice": "$672.00", "DiscountPrice": "$672.00", "WebPrice": "$638.40", "TotalPrice": "$638.40" }, { "Row": 2, "ID": 15636, "Item_ID": 578, "Parent_ID": -1, "StockCode": "SER200", "Description": "Bicycle Child Seat", "Quantity": 1, "UOM": "EA", "UnitType": 1, "DefaultPriceAmount": 221.0, "CustomerPriceAmount": 221.0, "DiscountPriceAmount": 221.0, "WebPriceAmount": 221.0, "TotalPriceAmount": 221.0, "UnitWeight": 0.0, "UnitVolume": 0.0, "IsBackordered": false, "Warehouse": "", "LastUpdated": "2022-10-04T20:04:06.85", "URL": "/ECommerce/product/drs-0406-4/rulon-lr-sleeve-bearing", "Photo": "/Ecommerce/site/images/Photo1/SER200.jpg", "DefaultPrice": "$221.00", "CustomerPrice": "$221.00", "DiscountPrice": "$221.00", "WebPrice": "$221.00", "TotalPrice": "$221.00" }, { "Row": 3, "ID": 15637, "Item_ID": 579, "Parent_ID": -1, "StockCode": "A100", "Description": "Boys 15 Speed Mountain Bike", "Quantity": 1, "UOM": "EA", "UnitType": 1, "DefaultPriceAmount": 560.0, "CustomerPriceAmount": 560.0, "DiscountPriceAmount": 560.0, "WebPriceAmount": 504.0, "TotalPriceAmount": 504.0, "UnitWeight": 10.0, "UnitVolume": 0.3, "IsBackordered": false, "Warehouse": "N", "LastUpdated": "2022-10-04T20:04:08.127", "URL": "/ECommerce/product/a100/boys-15-speed-mountain-bike", "Photo": "/Ecommerce/site/images/Photo1/A100.jpg", "DefaultPrice": "$560.00", "CustomerPrice": "$560.00", "DiscountPrice": "$560.00", "WebPrice": "$504.00", "TotalPrice": "$504.00" }] }, "Result": { "Success": true, "Message": "Items successfully added to the cart. There are 3 items in the Shopping Cart.", "ElapsedTime": "4676 ms" } }
| xml:string |